<!--视频所属用户信息-->
<template>
    <div style="width:100%;min-height:100px;">
<!--        视频所属用户组-->
        <div style="width:100px;height:100px;float:left;">
            <img :src="userHeadImgBase64" height="80" width="80" style="border-radius:40px;margin-left:10px;margin-top:10px;"/>
<!--            <div style="position:relative;width:80px;height:80px;margin-left:100px;top:-40px;border-radius:40px">-->
<!--                <img :src="userHeadImgBase64" height="80" width="80" style="border-radius:40px;"/>-->
<!--            </div>-->
        </div>

        <div style="width:calc(100% - 100px);height:50px;float:left;">
            <div style="width:100%;height:30px;line-height:30px;color:black">{{nickName}}</div>
            <div style="width:100%;height:20px;font-size:12px;color:#999999;line-height:12px;" v-bind:title="signTitle">{{sign}}</div>
        </div>

        <div style="width:calc(100% - 100px);height:40px;float:left;margin-top:5px;">
            <el-button type="danger" size="mini">
                <span style="font-size:16px !important;">点赞</span>
                <icon name="cham-dianzan" scale="1.6"></icon>
            </el-button>
            <el-button type="primary" size="mini">
                <span style="font-size:16px !important;">关注</span>
                <icon name="cham-plus" scale="1.6"></icon>
            </el-button>
        </div>
<!--        <div style="position:relative;width:80px;height:80px;margin-left:100px;top:-40px;border-radius:40px">-->
<!--            <img :src="userHeadImgBase64" height="80" width="80" style="border-radius:40px;"/>-->
<!--        </div>-->
    </div>
</template>

<script>
    export default {
        name: "videoUserInfo",
        data () {
            return {
                userHeadImgBase64:'',
                sign:'',
                nickName:'',
                signTitle:''
            }
        },
        created(){
            // var self = this;
            // var storage=window.localStorage;
            // var chamTokenInfo = storage.getItem("chamToken");
            //
            // if(chamTokenInfo!=null){
            //     self.showLoginAndRegister = false;
            //     self.showUserInfo = true;
            //     self.searchHotPointWidth = 350;
            //     self.$api.get('userController/getUserHeadImg',null, result => {
            //         self.userHeadImgBase64 = result;
            //     });
            //
            // }

        },
        mounted(){
            //根據傳過來的uuid去查用戶的頭像
        },
        methods:{
            _userInfoChange(userInfo){
                if(userInfo.sign.length>20){
                    this.sign = userInfo.sign.substring(0,20)+'...';
                }else{
                    this.sign = userInfo.sign;
                }

                this.signTitle = userInfo.sign;

                this.nickName = userInfo.nickName;
                this.userHeadImgBase64 = userInfo.imgBase64;
            }
        }
    }
</script>

<style scoped>

</style>
